package com.hospicpc.demos.mapper;

import com.hospicpc.demos.entity.Articles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author t
* @description 针对表【tb_articles】的数据库操作Mapper
* @createDate 2024-03-12 22:12:51
* @Entity com.hospicpc.demos.entity.Articles
*/
@Mapper
public interface ArticlesMapper extends BaseMapper<Articles> {

    @Select("select * from (select * from tb_articles where id > #{page} LIMIT #{pageNumber}) as a ORDER BY a.id DESC")
    public List<Articles> getPage(@Param("page") Integer page,@Param("pageNumber") Integer pageNumber);


    public List<Articles> getCollectArticleList( Long userId);
}




